<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateOcpcVivoLogTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('ocpc_vivo_log', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('自增id');
            $table->string('oaid',100)->comment('oaid');
            $table->string('imei',100)->comment('imei');
            $table->integer('pay_amount')->default(0)->comment('金额：分');
            $table->string('pkg',30)->default('')->comment('包名');
            $table->string('res',200)->default('')->comment('返回数据');
            $table->tinyInteger('type')->default(1)->comment('1：激活；2：注册;3:充值');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->tinyInteger('is_register')->default(0)->comment('是否是当天注册 1是 0不是');
            $table->timestamps();
            $table->comment('vivo ocpc日志');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('vivo_oppo_log');
    }
}
